<include file="Layouts:header"/><!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<div class="header navbar navbar-inverse navbar-fixed-top">
    <include file="Layouts:navigator"/>
</div>
<!-- END HEADER --><!-- BEGIN CONTAINER -->
<div class="page-container row-fluid">
    <include file="Layouts:slider"/>
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <include file="Layouts:bread_crumb"/>
        <div class="container-fluid mb-container" style="background-color: #fff;">
            <div class="tab-content">
                <div class="tab-pane  active">
                    <div class="portlet box">
                        <div class="portlet-body">
                            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline">
                                <h2>服务器基本信息</h2>
                                <table class="table table-striped table-bordered table-hover table-full-width dataTable" width="100%">
                                    <thead>
                                    <tr>
                                        <th width="8%" style="padding:10px;">编号</th>
                                        <th width="8%" style="padding:10px;">主机名</th>
                                        <th width="8%" style="padding:10px;">内网IP</th>
                                        <th width="8%" style="padding:10px;">外网IP</th>
                                        <th width="8%" style="padding:10px;">配置</th>
                                        <th width="8%" style="padding:10px;">位置</th>
                                        <th width="8%" style="padding:10px;">环境分级</th>
                                        <th width="8%" style="padding:10px;">操作系统</th>
                                        <th width="8%" style="padding:10px;">SSH端口</th>
                                        <th width="8%" style="padding:10px;">主要用途</th>
                                        <th width="8%" style="padding:10px;">主要使用者</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    foreach ($ecsList as $ecsId => $ecsItem) {
                                    ?>
                                    <tr>
                                        <td><?php echo $ecsItem['info']['id'] ?></td>
                                        <td><?php echo $ecsItem['info']['hostname'] ?></td>
                                        <td><?php echo $ecsItem['info']['eth0'] ?></td>
                                        <td><?php echo $ecsItem['info']['eth1'] ?></td>
                                        <td><?php echo $ecsItem['info']['configuration'] ?></td>
                                        <td><?php echo $ecsItem['info']['position'] ?></td>
                                        <td><?php echo $ecsItem['info']['env_type'] ?></td>
                                        <td><?php echo $ecsItem['info']['os'] ?></td>
                                        <td><?php echo $ecsItem['info']['ssh_port'] ?></td>
                                        <td><?php echo $ecsItem['info']['extend_desc'] ?></td>
                                        <td><?php echo implode(',', $ecsItem['users']) ?></td>
                                    </tr>
                                    <?php
                                    }
                                    ?>
                                    </tbody>
                                </table>
                            </div>

                            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline">
                                <h2>MySQL实例</h2>
                                <table class="table table-striped table-bordered table-hover table-full-width dataTable" width="100%">
                                    <thead>
                                    <tr>
                                        <th width="8%" style="padding:10px;">编号</th>
                                        <th width="8%" style="padding:10px;">主机名</th>
                                        <th width="8%" style="padding:10px;">端口</th>
                                        <th width="8%" style="padding:10px;">环境分级</th>
                                        <th width="8%" style="padding:10px;">角色</th>
                                        <th width="8%" style="padding:10px;">主要用途</th>
                                        <th width="8%" style="padding:10px;">版本</th>
                                        <th width="8%" style="padding:10px;">datadir</th>
                                        <th width="8%" style="padding:10px;">basedir</th>
                                        <th width="8%" style="padding:10px;">参数文件</th>
                                        <th width="8%" style="padding:10px;">启动关闭命令</th>
                                        <th width="8%" style="padding:10px;">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    foreach ($mysqlList as $mysqlId => $mysqlItem) {
                                    ?>
                                    <tr>
                                        <td><?php echo $mysqlItem['id'] ?></td>
                                        <td><?php echo $mysqlItem['hostname'] ?></td>
                                        <td><?php echo $mysqlItem['port'] ?></td>
                                        <td><?php echo $mysqlItem['env_type'] ?></td>
                                        <td><?php echo $mysqlItem['inst_role'] ?></td>
                                        <td><?php echo $mysqlItem['extend_desc'] ?></td>
                                        <td><?php echo $mysqlItem['version'] ?></td>
                                        <td><?php echo $mysqlItem['datadir'] ?></td>
                                        <td><?php echo $mysqlItem['basedir'] ?></td>
                                        <td><?php echo $mysqlItem['conf_path'] ?></td>
                                        <td><?php echo $mysqlItem['command'] ?></td>
                                        <td><a href="<?php echo $mysqlItem['schema_path'] ?>">Schema</a>&nbsp;&nbsp;<a href="<?php echo $mysqlItem['user_path'] ?>">User</a></td>
                                    </tr>
                                    <?php
                                    }
                                    ?>
                                    </tbody>
                                </table>
                            </div>

                            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline">
                                <h2>Nginx实例</h2>
                                <table class="table table-striped table-bordered table-hover table-full-width dataTable" width="100%">
                                    <thead>
                                    <tr>
                                        <th width="10%" style="padding:10px;">编号</th>
                                        <th width="10%" style="padding:10px;">主机名</th>
                                        <th width="10%" style="padding:10px;">端口</th>
                                        <th width="10%" style="padding:10px;">环境分级</th>
                                        <th width="10%" style="padding:10px;">版本</th>
                                        <th width="10%" style="padding:10px;">配置文件</th>
                                        <th width="10%" style="padding:10px;">日志文件</th>
                                        <th width="10%" style="padding:10px;">启动关闭命令</th>
                                        <th width="10%" style="padding:10px;">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    foreach ($nginxList as $nginxId => $nginxItem) {
                                    ?>
                                    <tr>
                                        <td><?php echo $nginxItem['id'] ?></td>
                                        <td><?php echo $nginxItem['hostname'] ?></td>
                                        <td><?php echo $nginxItem['port'] ?></td>
                                        <td><?php echo $nginxItem['env_type'] ?></td>
                                        <td><?php echo $nginxItem['version'] ?></td>
                                        <td><?php echo $nginxItem['conf_path'] ?></td>
                                        <td><?php echo $nginxItem['logfile_path'] ?></td>
                                        <td><?php echo $nginxItem['command'] ?></td>
                                        <td><a href="<?php echo $nginxItem['id'] ?>">二级域名列表</a></td>
                                    </tr>
                                    <?php
                                    }
                                    ?>
                                    </tbody>
                                </table>
                            </div>

                            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline">
                                <h2>Tomcat应用</h2>
                                <table class="table table-striped table-bordered table-hover table-full-width dataTable" width="100%">
                                    <thead>
                                    <tr>
                                        <th width="6%" style="padding:10px;">编号</th>
                                        <th width="6%" style="padding:10px;">主机名</th>
                                        <th width="6%" style="padding:10px;">应用名</th>
                                        <th width="6%" style="padding:10px;">server端口</th>
                                        <th width="6%" style="padding:10px;">shutdown端口</th>
                                        <th width="6%" style="padding:10px;">AJP端口</th>
                                        <th width="6%" style="padding:10px;">debug-port</th>
                                        <th width="6%" style="padding:10px;">SSL端口</th>
                                        <th width="6%" style="padding:10px;">环境分类</th>
                                        <th width="6%" style="padding:10px;">容器（软件）名称</th>
                                        <th width="6%" style="padding:10px;">安装主路径</th>
                                        <th width="6%" style="padding:10px;">访问url（接口）</th>
                                        <th width="6%" style="padding:10px;">启动关闭脚本</th>
                                        <th width="6%" style="padding:10px;">上线时间</th>
                                        <th width="6%" style="padding:10px;">应用状态</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    foreach ($tomcatList as $tomcatId => $tomcatItem) {
                                    ?>
                                    <tr>
                                        <td><?php echo $tomcatItem['id'] ?></td>
                                        <td><?php echo $tomcatItem['hostname'] ?></td>
                                        <td><?php echo $tomcatItem[''] ?></td>
                                        <td><?php echo $tomcatItem['server_port'] ?></td>
                                        <td><?php echo $tomcatItem['shutdown_port'] ?></td>
                                        <td><?php echo $tomcatItem['ajp_port'] ?></td>
                                        <td><?php echo $tomcatItem['debug_port'] ?></td>
                                        <td><?php echo $tomcatItem['ssl_port'] ?></td>
                                        <td><?php echo $tomcatItem['env_type'] ?></td>
                                        <td><?php echo $tomcatItem[''] ?></td>
                                        <td><?php echo $tomcatItem['base_path'] ?></td>
                                        <td><?php echo $tomcatItem[''] ?></td>
                                        <td><?php echo $tomcatItem['command'] ?></td>
                                        <td><?php echo $tomcatItem['online_time'] ?></td>
                                        <td><?php echo $tomcatItem[''] ?></td>
                                    </tr>
                                    <?php
                                    }
                                    ?>
                                    </tbody>
                                </table>
                            </div>

                            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline">
                                <h2>Redis实例</h2>
                                <table class="table table-striped table-bordered table-hover table-full-width dataTable" width="100%">
                                    <thead>
                                    <tr>
                                        <th width="6%" style="padding:10px;">编号</th>
                                        <th width="6%" style="padding:10px;">主机名</th>
                                        <th width="6%" style="padding:10px;">端口</th>
                                        <th width="6%" style="padding:10px;">版本</th>
                                        <th width="6%" style="padding:10px;">环境分级</th>
                                        <th width="6%" style="padding:10px;">用途</th>
                                        <th width="6%" style="padding:10px;">安装路径</th>
                                        <th width="6%" style="padding:10px;">logfile</th>
                                        <th width="6%" style="padding:10px;">数据文件</th>
                                        <th width="6%" style="padding:10px;">conf文件</th>
                                        <th width="6%" style="padding:10px;">启动关闭脚本</th>
                                        <th width="6%" style="padding:10px;">主要使用者</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    foreach ($redisList as $redisId => $redisItem) {
                                    ?>
                                    <tr>
                                        <td><?php echo $redisItem['info']['id'] ?></td>
                                        <td><?php echo $redisItem['info']['hostname'] ?></td>
                                        <td><?php echo $redisItem['info']['port'] ?></td>
                                        <td><?php echo $redisItem['info']['version'] ?></td>
                                        <td><?php echo $redisItem['info']['env_type'] ?></td>
                                        <td><?php echo $redisItem['info']['extend_desc'] ?></td>
                                        <td><?php echo $redisItem['info']['bin_path'] ?></td>
                                        <td><?php echo $redisItem['info']['logfile_path'] ?></td>
                                        <td><?php echo $redisItem['info']['data_path'] ?></td>
                                        <td><?php echo $redisItem['info']['conf_path'] ?></td>
                                        <td><?php echo $redisItem['info']['command'] ?></td>
                                        <td><?php echo implode(',', $redisItem['users']) ?></td>
                                    </tr>
                                    <?php
                                    }
                                    ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- loading start -->
        <div id="loadingBox"
             style="display:none;position: fixed; left: 50%; top: 50%; width: 150px; height: 150px; margin-left: -75px; margin-top: -75px;">
            <img src="/Public/frontapp/media/image/loading-spinner.gif"/>
        </div>
        <!-- loading end -->
        <!-- mask start -->
        <div id="mask" class="modal-backdrop" style="display:none;">
        </div>
        <!-- mask end -->
        <include file="Layouts:add_issue_window"/>
    </div>
    <include file="Layouts:foot_page"/>
    <script type="text/javascript" src="/Public/frontapp/sea.js">
    </script>
    <script type="text/javascript" src="/Public/frontapp/config/config.js">
    </script>
    <script type="text/javascript" src="/Public/frontapp/lib/seajs-text.js">
    </script>
    <script type="text/javascript">
//        seajs.use("/Public/frontapp/src/people_current.js?v20150819");
    </script>
</body>
<!-- END BODY -->
</html>
